@import "compass/utilities/sprites/base";

// General Sprite Defaults
// You can override them before you import this file.
$icon-sprite-dimensions : false !default;
$icon-use-percentages   : false !default;
$icon-position          : 0% !default;
$icon-spacing           : 0 !default;
$icon-repeat            : no-repeat !default;
$icon-prefix            : '' !default;
$icon-clean-up          : true !default;
$icon-layout            : vertical !default;
$icon-inline            : false !default;
$icon-sort-by           : 'none' !default;
$icon-class-separator   : $default-sprite-separator !default;
$icon-sprite-base-class : ".icon#{$icon-class-separator}sprite" !default;

  
 // These variables control the generated sprite output
 // You can override them selectively before you import this file.
 
   $icon-w10_l-active-position: $icon-position !default;
   $icon-w10_l-active-spacing:  $icon-spacing !default;
   $icon-w10_l-active-repeat:   $icon-repeat !default;
 
   $icon-w10_l-hover-position: $icon-position !default;
   $icon-w10_l-hover-spacing:  $icon-spacing !default;
   $icon-w10_l-hover-repeat:   $icon-repeat !default;
 
   $icon-w10_l-position: $icon-position !default;
   $icon-w10_l-spacing:  $icon-spacing !default;
   $icon-w10_l-repeat:   $icon-repeat !default;
 
   $icon-w11_l-position: $icon-position !default;
   $icon-w11_l-spacing:  $icon-spacing !default;
   $icon-w11_l-repeat:   $icon-repeat !default;
 
   $icon-w12_l-position: $icon-position !default;
   $icon-w12_l-spacing:  $icon-spacing !default;
   $icon-w12_l-repeat:   $icon-repeat !default;
 
   $icon-w13_l-position: $icon-position !default;
   $icon-w13_l-spacing:  $icon-spacing !default;
   $icon-w13_l-repeat:   $icon-repeat !default;
 
   $icon-w14_l-position: $icon-position !default;
   $icon-w14_l-spacing:  $icon-spacing !default;
   $icon-w14_l-repeat:   $icon-repeat !default;
 
   $icon-w16_l-position: $icon-position !default;
   $icon-w16_l-spacing:  $icon-spacing !default;
   $icon-w16_l-repeat:   $icon-repeat !default;
 
   $icon-w19_l-position: $icon-position !default;
   $icon-w19_l-spacing:  $icon-spacing !default;
   $icon-w19_l-repeat:   $icon-repeat !default;
 
   $icon-w20_l-position: $icon-position !default;
   $icon-w20_l-spacing:  $icon-spacing !default;
   $icon-w20_l-repeat:   $icon-repeat !default;
 
   $icon-w26_l-position: $icon-position !default;
   $icon-w26_l-spacing:  $icon-spacing !default;
   $icon-w26_l-repeat:   $icon-repeat !default;
 
   $icon-w28_l-position: $icon-position !default;
   $icon-w28_l-spacing:  $icon-spacing !default;
   $icon-w28_l-repeat:   $icon-repeat !default;
 
   $icon-w32_l-position: $icon-position !default;
   $icon-w32_l-spacing:  $icon-spacing !default;
   $icon-w32_l-repeat:   $icon-repeat !default;
 
   $icon-w37_l-position: $icon-position !default;
   $icon-w37_l-spacing:  $icon-spacing !default;
   $icon-w37_l-repeat:   $icon-repeat !default;
 
   $icon-w39_l-position: $icon-position !default;
   $icon-w39_l-spacing:  $icon-spacing !default;
   $icon-w39_l-repeat:   $icon-repeat !default;
 
   $icon-w40_l-position: $icon-position !default;
   $icon-w40_l-spacing:  $icon-spacing !default;
   $icon-w40_l-repeat:   $icon-repeat !default;
 
   $icon-w41_l-position: $icon-position !default;
   $icon-w41_l-spacing:  $icon-spacing !default;
   $icon-w41_l-repeat:   $icon-repeat !default;
 
   $icon-w42-position: $icon-position !default;
   $icon-w42-spacing:  $icon-spacing !default;
   $icon-w42-repeat:   $icon-repeat !default;
 
   $icon-w60_l-position: $icon-position !default;
   $icon-w60_l-spacing:  $icon-spacing !default;
   $icon-w60_l-repeat:   $icon-repeat !default;
 
   $icon-w61_l-position: $icon-position !default;
   $icon-w61_l-spacing:  $icon-spacing !default;
   $icon-w61_l-repeat:   $icon-repeat !default;
 
   $icon-w62_l-position: $icon-position !default;
   $icon-w62_l-spacing:  $icon-spacing !default;
   $icon-w62_l-repeat:   $icon-repeat !default;
 
   $icon-w63_l-position: $icon-position !default;
   $icon-w63_l-spacing:  $icon-spacing !default;
   $icon-w63_l-repeat:   $icon-repeat !default;
 
   $icon-w64_l-position: $icon-position !default;
   $icon-w64_l-spacing:  $icon-spacing !default;
   $icon-w64_l-repeat:   $icon-repeat !default;
 
   $icon-w65_l-position: $icon-position !default;
   $icon-w65_l-spacing:  $icon-spacing !default;
   $icon-w65_l-repeat:   $icon-repeat !default;
 

 $icon-sprites: sprite-map("icon/*.png",
 
   $icon-w10_l-active-position: $icon-w10_l-active-position, 
   $icon-w10_l-active-spacing:  $icon-w10_l-active-spacing, 
   $icon-w10_l-active-repeat:   $icon-w10_l-active-repeat,
 
   $icon-w10_l-hover-position: $icon-w10_l-hover-position, 
   $icon-w10_l-hover-spacing:  $icon-w10_l-hover-spacing, 
   $icon-w10_l-hover-repeat:   $icon-w10_l-hover-repeat,
 
   $icon-w10_l-position: $icon-w10_l-position, 
   $icon-w10_l-spacing:  $icon-w10_l-spacing, 
   $icon-w10_l-repeat:   $icon-w10_l-repeat,
 
   $icon-w11_l-position: $icon-w11_l-position, 
   $icon-w11_l-spacing:  $icon-w11_l-spacing, 
   $icon-w11_l-repeat:   $icon-w11_l-repeat,
 
   $icon-w12_l-position: $icon-w12_l-position, 
   $icon-w12_l-spacing:  $icon-w12_l-spacing, 
   $icon-w12_l-repeat:   $icon-w12_l-repeat,
 
   $icon-w13_l-position: $icon-w13_l-position, 
   $icon-w13_l-spacing:  $icon-w13_l-spacing, 
   $icon-w13_l-repeat:   $icon-w13_l-repeat,
 
   $icon-w14_l-position: $icon-w14_l-position, 
   $icon-w14_l-spacing:  $icon-w14_l-spacing, 
   $icon-w14_l-repeat:   $icon-w14_l-repeat,
 
   $icon-w16_l-position: $icon-w16_l-position, 
   $icon-w16_l-spacing:  $icon-w16_l-spacing, 
   $icon-w16_l-repeat:   $icon-w16_l-repeat,
 
   $icon-w19_l-position: $icon-w19_l-position, 
   $icon-w19_l-spacing:  $icon-w19_l-spacing, 
   $icon-w19_l-repeat:   $icon-w19_l-repeat,
 
   $icon-w20_l-position: $icon-w20_l-position, 
   $icon-w20_l-spacing:  $icon-w20_l-spacing, 
   $icon-w20_l-repeat:   $icon-w20_l-repeat,
 
   $icon-w26_l-position: $icon-w26_l-position, 
   $icon-w26_l-spacing:  $icon-w26_l-spacing, 
   $icon-w26_l-repeat:   $icon-w26_l-repeat,
 
   $icon-w28_l-position: $icon-w28_l-position, 
   $icon-w28_l-spacing:  $icon-w28_l-spacing, 
   $icon-w28_l-repeat:   $icon-w28_l-repeat,
 
   $icon-w32_l-position: $icon-w32_l-position, 
   $icon-w32_l-spacing:  $icon-w32_l-spacing, 
   $icon-w32_l-repeat:   $icon-w32_l-repeat,
 
   $icon-w37_l-position: $icon-w37_l-position, 
   $icon-w37_l-spacing:  $icon-w37_l-spacing, 
   $icon-w37_l-repeat:   $icon-w37_l-repeat,
 
   $icon-w39_l-position: $icon-w39_l-position, 
   $icon-w39_l-spacing:  $icon-w39_l-spacing, 
   $icon-w39_l-repeat:   $icon-w39_l-repeat,
 
   $icon-w40_l-position: $icon-w40_l-position, 
   $icon-w40_l-spacing:  $icon-w40_l-spacing, 
   $icon-w40_l-repeat:   $icon-w40_l-repeat,
 
   $icon-w41_l-position: $icon-w41_l-position, 
   $icon-w41_l-spacing:  $icon-w41_l-spacing, 
   $icon-w41_l-repeat:   $icon-w41_l-repeat,
 
   $icon-w42-position: $icon-w42-position, 
   $icon-w42-spacing:  $icon-w42-spacing, 
   $icon-w42-repeat:   $icon-w42-repeat,
 
   $icon-w60_l-position: $icon-w60_l-position, 
   $icon-w60_l-spacing:  $icon-w60_l-spacing, 
   $icon-w60_l-repeat:   $icon-w60_l-repeat,
 
   $icon-w61_l-position: $icon-w61_l-position, 
   $icon-w61_l-spacing:  $icon-w61_l-spacing, 
   $icon-w61_l-repeat:   $icon-w61_l-repeat,
 
   $icon-w62_l-position: $icon-w62_l-position, 
   $icon-w62_l-spacing:  $icon-w62_l-spacing, 
   $icon-w62_l-repeat:   $icon-w62_l-repeat,
 
   $icon-w63_l-position: $icon-w63_l-position, 
   $icon-w63_l-spacing:  $icon-w63_l-spacing, 
   $icon-w63_l-repeat:   $icon-w63_l-repeat,
 
   $icon-w64_l-position: $icon-w64_l-position, 
   $icon-w64_l-spacing:  $icon-w64_l-spacing, 
   $icon-w64_l-repeat:   $icon-w64_l-repeat,
 
   $icon-w65_l-position: $icon-w65_l-position, 
   $icon-w65_l-spacing:  $icon-w65_l-spacing, 
   $icon-w65_l-repeat:   $icon-w65_l-repeat,
 
 $layout   : $icon-layout,
 $cleanup  : $icon-clean-up,
 $spacing  : $icon-spacing,
 $position : $icon-position,
 $sort-by  : $icon-sort-by
 );


// All sprites should extend this class
// The icon-sprite mixin will do so for you.
@if $icon-inline {
  #{$icon-sprite-base-class} {
    background-image: inline-sprite($icon-sprites);
  } 
} @else {
  #{$icon-sprite-base-class} {
    background-image: sprite-url($icon-sprites);
    background-repeat: no-repeat;
  }
}
//sass functions to return the dimensions of a sprite image as units

  @function icon-sprite-width($name) {
    @return sprite-width($icon-sprites, $name);
  }

  @function icon-sprite-height($name) {
    @return sprite-height($icon-sprites, $name);
  }


// Use this to set the dimensions of an element
// based on the size of the original image.
@mixin icon-sprite-dimensions($name) {
  @include sprite-dimensions($icon-sprites, $name)
}

// Move the background position to display the sprite.
@mixin icon-sprite-position($name, $offset-x: 0, $offset-y: 0, $use-percentages: $icon-use-percentages) {
  @include sprite-background-position($icon-sprites, $name, $offset-x, $offset-y, $use-percentages)
}

// Extends the sprite base class and set the background position for the desired sprite.
// It will also apply the image dimensions if $dimensions is true.
@mixin icon-sprite($name, $dimensions: $icon-sprite-dimensions, $offset-x: 0, $offset-y: 0, $use-percentages: $icon-use-percentages, $separator: $icon-class-separator) {
  @extend #{$icon-sprite-base-class};
  @include sprite($icon-sprites, $name, $dimensions, $offset-x, $offset-y, $use-percentages, $separator: $separator);
}

@mixin icon-sprites($sprite-names, $dimensions: $icon-sprite-dimensions, $prefix: sprite-map-name($icon-sprites), $offset-x: 0, $offset-y: 0, $use-percentages: $icon-use-percentages, $separator: $icon-class-separator) {
  @include sprites($icon-sprites, $sprite-names, $icon-sprite-base-class, $dimensions, $prefix, $offset-x, $offset-y, $use-percentages, $separator: $separator)
}

// Generates a class for each sprited image.
@mixin all-icon-sprites($dimensions: $icon-sprite-dimensions, $prefix: sprite-map-name($icon-sprites), $offset-x: 0, $offset-y: 0, $use-percentages: $icon-use-percentages, $separator: $icon-class-separator) {
  @include icon-sprites(w10_l-active w10_l-hover w10_l w11_l w12_l w13_l w14_l w16_l w19_l w20_l w26_l w28_l w32_l w37_l w39_l w40_l w41_l w42 w60_l w61_l w62_l w63_l w64_l w65_l, $dimensions, $prefix, $offset-x, $offset-y, $use-percentages, $separator: $separator);
}
